import request from '/@/utils/request'
/**
 * getList: 获取分销商列表
 */
export function useSaleApi(){
    return {
        getList: (params?: object) => {
			return request({
				url: '/pms/saleOrder/getSaleList',
				method: 'post',
				data: params,
			})
		},
		getSaleOrder: (params?:String) => {
			return request({
				url: '/pms/saleOrder/pageList',
				method: 'post',
				data: params
			})
		},
		settleOrder: (params?:String) => {
			return request({
				url: '/pms/saleOrder/settleOrder',
				method: 'post',
				data: params
			})
		},
		getSetting: (params?:object) => {
			return request({
				url: '/pms/sale/setting/getInfo',
				method: 'get',
				params
			})
		},
		saleGoods: (params?:object) => {
			return request({
				url: '/pms/saleGoods/pageList',
				method: 'get',
				params
			})
		},
		addSetting: (params?:String) => {
			return request({
				url: '/pms/sale/setting',
				method: 'post',
				data: params
			})
		},
		getNotGoods: (params?:String) => {
			return request({
				url: '/pms/saleGoods/notOrders',
				method: 'post',
				data: params
			})
		},
		updateSkuIds: (params?:String) => {
			return request({
				url: '/pms/saleGoods/edits',
				method: 'post',
				data: params
			})
		},
		addSaleGoods: (params?:String) => {
			return request({
				url: '/pms/saleGoods',
				method: 'post',
				data: params
			})
		},
		getApproveList: (params?:String) => {
			return request({
				url: '/pms/sale/applyFor/pageList',
				method: 'post',
				data: params
			})
		},
		editApprove: (params?:String) => {
			return request({
				url: '/pms/sale/applyFor/edit',
				method: 'post',
				data: params
			})
		},
		getUsers: (params?:object) => {
			return request({
				url: '/pms/saleOrder/getSaleUsers',
				method: 'get',
				params
			})
		},
		refreshInvite: (params?:object) => {
			return request({
				url: '/pms/sale/setting/refreshInvite',
				method: 'get',
				params
			})
		},
    }
}